package com.qding.park.common.core.restborder;

import com.qding.park.manager.pojo.enums.ReserverStatusEnum;

/**
 * @ClassName: BorderStatuTran
 * @Description: 办界状态转化
 * @author Comsys-Administrator
 * @date 2016年10月24日 下午2:12:40
 *
 */
public class BorderStatuTran {

	/**
	  * @ClassName: ReserveStatusEnum
	  * @Description: 预定单状态
	  * @author Comsys-Administrator
	  * @date 2016年10月24日 下午2:31:24
	  *
	  */
	private static enum ReserveStatusEnum {

		NOTINCHECK(1, "预定未入场,"), NOTINCHECKED(2, "预定已入场,"), CANCEL(3, "取消息预定"), TIMEOUT(4, "预定超时");

		private int status;

		private String desc;

		private ReserveStatusEnum(int status, String desc) {
			this.status = status;
			this.desc = desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		
	}

	/**
	  * @ClassName: TeneratPaymentStatusEnum
	  * @Description: 代缴单状态
	  * @author Comsys-Administrator
	  * @date 2016年10月24日 下午2:30:26
	  *
	  */
	private static enum TeneratPaymentStatusEnum {

		NOTPAYED(1, "未支付"),
		PAYED(2, "已支付"), 
		CLOSED(3, "已关闭");

		private int status;

		private String desc;

		private TeneratPaymentStatusEnum(int status,String desc){
			this.status=status;
			this.desc=desc;
		}

		public int getStatus() {
			return status;
		}

		public void setStatus(int status) {
			this.status = status;
		}

		public String getDesc() {
			return desc;
		}

		public void setDesc(String desc) {
			this.desc = desc;
		}
		
		
	}
	
	
	public static int reserveStatusTran(int _status){
		int status=0;
		if(_status==ReserverStatusEnum.TEMP_PAY_UNPAYED.getStatus()){
			status=ReserveStatusEnum.CANCEL.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_ORDER_ININT.getStatus()){
			status=ReserveStatusEnum.NOTINCHECK.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_PAYED_SUCCESS.getStatus()){
			status=ReserveStatusEnum.NOTINCHECK.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_PAYED_FAIL.getStatus()){
			status=ReserveStatusEnum.NOTINCHECK.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_INCHECK.getStatus()){
			status=ReserveStatusEnum.NOTINCHECKED.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_OVERTIME.getStatus()){
			status=ReserveStatusEnum.TIMEOUT.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_DELAY_TIMEOUT.getStatus()){
			status=ReserveStatusEnum.TIMEOUT.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_OVERTIME_INCHECK.getStatus()){
			status=ReserveStatusEnum.NOTINCHECKED.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_ISSUED_PARKSUCCESS.getStatus()){
			status=ReserveStatusEnum.NOTINCHECK.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_ISSUED_PARKFail.getStatus()){
			status=ReserveStatusEnum.CANCEL.getStatus();
		}else if(_status==ReserverStatusEnum.RESERVER_CANCEL.getStatus()){
			status=ReserveStatusEnum.CANCEL.getStatus();
		}
		return status;
	}
	
	public static int teneratPaymentStatusTran(int _status){
		int status=0;
		if(_status==ReserverStatusEnum.TEMP_PAY_UNPAYED.getStatus()){
			status=TeneratPaymentStatusEnum.NOTPAYED.getStatus();
		}else if(_status==ReserverStatusEnum.TEMP_PAY_PAYED.getStatus()){
			status=TeneratPaymentStatusEnum.PAYED.getStatus();
		}else if(_status==ReserverStatusEnum.CANCEL_TEMP_PAY.getStatus()){
			status=TeneratPaymentStatusEnum.CLOSED.getStatus();
		}else if(_status==ReserverStatusEnum.TEMP_PAY_PAYFAIL.getStatus()){
			status=TeneratPaymentStatusEnum.NOTPAYED.getStatus();
		}else if(_status==ReserverStatusEnum.TEMP_PAY_PARK_HANDED.getStatus()){
			status=TeneratPaymentStatusEnum.PAYED.getStatus();
		}else if(_status==ReserverStatusEnum.TEMP_PAY_PARK_CLOSEED.getStatus()){
			status=TeneratPaymentStatusEnum.CLOSED.getStatus();
		}
		
		return status;
	}

}
